<template>
	
	<view class="container">
		<view class="header">
			<view class="cate_item" v-for="(item, index) in cateList" @click="initData(item)">
				{{item}}
			</view>
			
		</view>
		<view style="position: absolute;"></view>
		<PageRender :page="page" :refreshCounter="refreshCounter" theme="default"></PageRender>
	</view>
</template>

<script>
	export default {
		components: {
		},
		data() {
			return {
				uuid: '',
				key:'',
				search:'',
				info: {
				},
				cateList:[],
				// cateList:['新人盲盒','电商盲盒','计生用品','未来科技'],
				refreshCounter: 1,
				day:1
			}
		},
		computed: {
			page () {
				return this.info.content || {}
			}
		},
		watch: {},
		onLoad(e) {
			this.uuid = e.uuid
			this.initData()
		},
		onShow() {
			this.refreshCounter ++
		},
		methods: {
			st_loadData(){
				let st = true;
				if(st == 1){
					console.info(1)
				}
			},
			st_list(){
				let status = true;
				if(status){
					status = false;
					console.info(222)
				}
			},
			st_pay(){
				let s = 1;
				if(s == 1){
			
				}else if(s == 2){
				
				}
			},
			initData(item) {
				uni.showLoading({
					title: '加载中'
				})
				if(item){
					this.search = item;
				}else{
					this.search='';
				}
				console.log(this.search);
				this.$http(`/pages/${this.uuid}`).then(res => {
					this.info = res.data.info
					
					uni.hideLoading()
				});
				 
			},
			
		},
		onPageScroll(e) {}
	}
</script>

<style lang="scss" scoped>
	.container {
		
		.header {
			// height: 70upx;
			display: flex;
			justify-content: space-between;
			padding-left: 50rpx;
		}
		
	}
	
	.st_main{
		background-color: transparent;
		font-size: 28rpx;
		font-weight: bold;
		display: flex;
		flex-direction: row;
	}
	.st_list{
		background-color: transparent;
		display: flex;
		font-size: 28rpx;
	}
</style>
